In an electrical apparatus such as a digital camera or an ink jet printer including an operation component driven by a motor, a sensor is used to detect a motion speed of the operation component. The sensor generally has three types of terminals: a power supply terminal, a sensor output terminal, and a GND terminal. This makes it difficult to make the sensor smaller so that the sensor made smaller is suited to such an electrical apparatus that is made smaller. A wire-saved optical sensor is required for a reduction in process for manufacturing sensors, and for an increase in yield of the sensors. In order to meet such a requirement, a sensor having fewer terminals is being developed.
For example, Patent Literature 1 discloses a detecting device that is usable as a two-terminal sensor by causing a sensor output terminal and a GND terminal to be shared with each other. In this detecting device, sensor means including a detection element (detecting section) is driven at a constant voltage generated by constant voltage generating means. Then, an output of the sensor means is compared with a comparative voltage by comparison means. Further, in the detecting device, a high current value and a low current value of a rectangular wave current are switched by on and off outputs of a comparator of the comparison means.
Patent Literature 2 discloses a detecting device that is usable as a two-terminal sensor by causing a power supply terminal and a sensor output terminal to be shared with each other. In this detecting device, an output of sensor is compared, by a comparator, with a voltage obtained by causing a resistance to divide a reference voltage outputted from reference voltage generating means. Then, an output of the comparator is outputted to current amplification means or current setting means via two-wire/three-wire switching means. As described above, the detecting device thus including the two-wire/three-wire switching means is usable as a two-wire/three-wire detecting device.